package meterMonitor.mapper;

import meterMonitor.model.MonitorDetail;
import org.apache.ibatis.annotations.Param;
import org.codehaus.jackson.SerializableString;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.Timestamp;
import java.util.List;

public interface MonitorDetailMapper {
    // int deleteByPrimaryKey(Long pkid);
    //
    // int insert(MonitorDetail record);
    //
    // int insertSelective(MonitorDetail record);
    //
    // MonitorDetail selectByPrimaryKey(Long pkid);
    //
    // int updateByPrimaryKeySelective(MonitorDetail record);
    //
    // int updateByPrimaryKey(MonitorDetail record);
    //
    // List<MonitorDetail> selectAll(ReqDetails reqDetails);
    //
    // MonitorDetail selectReaderCode(@Param("readerCode") String deviceName);

    List<MonitorDetail> queryData(@Param("fromTime") String fromTime, @Param("toTime") String toTime, @Param("codes") String codes);

    MonitorDetail queryOne(MonitorDetail monitorDetail);

    List<MonitorDetail> queryOneWaterElectricity(MonitorDetail monitorDetail);





    List<MonitorDetail> queryRealtime(MonitorDetail monitorDetail);

    Double queryCurrentMonth(Timestamp uploadTime, long meterCode);


    /********新增********/

    List<String> queryTimeQuantum(String start, String end);

    List<MonitorDetail> queryByTimeQuantum(Timestamp start, Timestamp end, Long meterCode);

    MonitorDetail getCurrentByMeterCode(Long meterCode);
}
